home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
cpp_libs
/
answrbok
/
6_1.lha
/
6_1
/
tst1.c
< prev
next >
Wrap
Text File
|
1993-08-08
|
596b
|
35 lines
* Copyright (c) 1990 by AT&T Bell Telephone Laboratories, Incorporated. */
* The C++ Answer Book */
* Tony Hansen */
* All rights reserved. */
include <strclass.h>
ifdef A
include <6_1a1b.c>
else
include <6_1a2b.c>
include <6_1a2c.c>
endif
ain()
string x[100];
cout << "here we go\n";
for (int n = 0; cin>>x[n]; n++)
{
string y;
if (n == 100) error("too many strings");
cout << (y = x[n]);
if (y == "done") break;
}
cout << "here we go back again\n";
for (int i = n-1; 0 <= i; i--)
cout << x[i];
for (i = n-1; 0 <= i; i--)
{
outputstring(x[i]);
cout << "\n";
}
return 0;